Skip to content

Constrain TypeScript language server defaults#481

Merged
prydonius merged 1 commit intomainfrom
zerg/typescript-lsp-resource-defaults
Apr 30, 2026
Merged

Constrain TypeScript language server defaults#481
prydonius merged 1 commit intomainfrom
zerg/typescript-lsp-resource-defaults

Conversation

@prydonius
Copy link
Copy Markdown
Contributor

Why

We found microVMs where TypeScript language server subprocesses (tsserver and typingsInstaller) could consume multiple GiB of memory and contribute to system-side memory pressure. The matching goval PR contains pid1-side cgroup containment; this PR puts TypeScript-specific language-server defaults in the module that owns the language-server config.

What changed

  • Set disableAutomaticTypingAcquisition = true for typescript-language-server to avoid automatic @types/* discovery/install work by default.
  • Set maxTsServerMemory = 1536 to cap the TypeScript server V8 old-space budget.
  • Left the existing tsserver.fallbackPath unchanged.

Test plan

  • nix fmt .
  • nix eval .#activeModules.typescript-language-server --json
  • nix build .#typescript-language-server --no-link

Rollout

  • This is fully backward and forward compatible

This is safe to revert. Reverting restores the previous TypeScript language-server initialization options.

~ written by Zerg 👾 (elite-medic-8365)

@prydonius prydonius added the zergling-authored Authored by Zerg agent label Apr 28, 2026
@prydonius prydonius marked this pull request as ready for review April 29, 2026 00:39
@prydonius prydonius requested a review from a team as a code owner April 29, 2026 00:39
@prydonius prydonius requested review from cbrewster and ryantm and removed request for a team April 29, 2026 00:39
@prydonius prydonius merged commit 143c07c into main Apr 30, 2026
3 checks passed
@prydonius prydonius deleted the zerg/typescript-lsp-resource-defaults branch April 30, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zergling-authored Authored by Zerg agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants